package cn.itcast.user.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    static Logger log = LoggerFactory.getLogger("cn.itcast.user.web");

    public static void main(String[] args) {
        MDC.put("user_code","0001");
        log.info("0001用户");
        MDC.clear();

        MDC.put("user_code","0002");
        log.info("0002用户");
        MDC.clear();
    }
}